package com.yaodian100.ec.giftcard.service;

import java.io.InputStream;
import java.util.List;

import com.yaodian100.core.common.entity.SimplePager;
import com.yaodian100.core.common.exception.CoreException;
import com.yaodian100.core.common.service.DomainService;
import com.yaodian100.ec.giftcard.entity.GiftcardAmount;
import com.yaodian100.ec.giftcard.entity.GiftcardItem;
import com.yaodian100.ec.giftcard.entity.GiftcardMain;
import com.yaodian100.ec.giftcard.entity.GiftcardReceiveItem;
import com.yaodian100.ec.giftcard.entity.GiftcardReceiveMain;
import com.yaodian100.ec.giftcard.service.vo.ReceiveGiftcardVo;
import com.yaodian100.ec.member.entity.VirtualBalance;

public interface GiftcardService extends DomainService<GiftcardMain> {
	public List<Object> queryGiftcard(String giftcardName,String applyDate,String giftcardQueryStatus
			,SimplePager pager) throws Exception;
	
	public void generate(GiftcardMain giftcardMain, String[] amount, String[] count) throws CoreException;
	
	public List<GiftcardAmount> getGiftcardAmountsByMainId(Long mainId) throws Exception;
	
	public GiftcardAmount getGiftcardAmountByAmountId(Long amountId) throws Exception;
	
	public List<GiftcardItem> getGiftcardItemsByAmountId(Long amountId) throws Exception;
	
	public InputStream exportGiftcard(Long amountId) throws Exception;
	
	public void warehouseGiftcard(Long amountId) throws CoreException;
	
	public void cancelGiftcard(Long amountId) throws CoreException;
	
	public List<GiftcardItem> queryGiftcardItems(Long amountId,SimplePager pager) throws Exception;
	
	public List<Object> queryReceiveGiftcard(Long receiveId,String applyDateStart,String applyDateEnd
			,String receiveDateStart,String receiveDateEnd,String approveDateStart,String approveDateEnd
			,String giftcardReceiveQueryStatus,String receiveUser,String applyUser,SimplePager pager)
		throws Exception;
	
	public boolean checkGiftcardCode(String giftcardCode) throws Exception;
	
	public List<Object> queryAddReceiveGiftcard(String startGiftcardCode,Integer giftcardCount) throws Exception;
	
	public GiftcardReceiveMain receiveGiftcard(ReceiveGiftcardVo receiveGiftcardVo) throws CoreException;
	
	public void publishGiftcard(Long receiveId) throws CoreException;
	
	public GiftcardReceiveMain getGiftcardReceiveMainByReceiveId(Long receiveId) throws Exception;
	
	public List<GiftcardReceiveItem> getGiftcardReceiveItemsByReceiveId(Long receiveId) throws Exception;
	
	public InputStream exportReceiveItems(Long receiveId) throws Exception;
	
	public void approve(Long receiveId,boolean isApprove,String disapproveReason) throws CoreException;
	
	public int checkCardCode(String cardCode,String cardPassword) throws Exception;
	
	public GiftcardAmount getGiftcardAmountByCardCode(String cardCode) throws Exception;
	
	public GiftcardItem getGiftcardItemByCardCode(String cardCode) throws Exception;
	
	public void rechargeGiftcard(VirtualBalance virtualBalance,GiftcardItem giftcardItem) throws CoreException;
}